//Function to seperate URL links and thus get submitting
//attributes.
//Return an array containing information from URL
function getParamFromURL(paras) {
	var url = location.href;
	var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
	var paraObj = {};
	for ( var i = 0; i < paraString.length; i++) {
		var j = paraString[i];
		paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j
				.indexOf("=") + 1, j.length);
	}
	var returnValue = paraObj[paras.toLowerCase()];
	if (typeof (returnValue) == "undefined") {
		return "";
	} else {
		return returnValue;
	}
}

//Reload the page referrer.
function reloadReferrer() {
	location.href = document.referrer;
}

//Reload current page
function reloadCurrent() {
	location.reload(false);
}

//Check if the parameter is void
//Return true if it is void
function checkIfNull(check) {
	return check == "";
}

//Check if the parameter is an integer
//Return true if it is an integer
function checkIfInt(Num) {
	var i = parseInt(Num);
	return !isNaN(i) && i.toString() == Num && i >= 0;
}

//Check if the parameter is a float number
//Return true if it is a float number
function checkIfFloat(Num) {
	var parts = Num.split(".");
	if (parts.length > 2) {
		return false;
	}
	if (parts.length == 1) {
		return checkIfInt(Num);
	} else {
		return checkIfInt(parts[0])
				&& (checkIfInt(parts[1]) || parts[1] == "00");
	}
}
